package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Order;
import cn.wolfcode.trip.base.domain.Product;
import cn.wolfcode.trip.base.query.OrderQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Order record);

    Order selectByPrimaryKey(Long id);

    Order selectOne(Long id);

    List<Order> selectAll();

    int updateByPrimaryKey(Order record);

    //分页
    List<Order> selectForList(OrderQueryObject qo);

    //购物车
    List<Order> selectForListByTypeAndUserId(OrderQueryObject qo);

    void insertPay(Order order);

    //根据用户id与商品id获取订单
    Order selectByUserIdAndPId();
}